package com.cet.controller;

import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

public class MyWebFilter implements WebFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {

        Mono<Void> filter = chain.filter(exchange);

        return filter.doFinally(v -> {
            System.out.println("执行结束！");
        });
    }
}
